#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int n = 20;
	int sum = 20;

	while (n >= 2) {
		sum += n / 2;
		if (n % 2 == 0)
			n /= 2;
		else n = n % 2 + n / 2;
	}
	printf("%d", sum);
	return 0;
}